{% extends "base.html" %}

{% block title %}个人设置{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">个人设置</h4>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label class="form-label">用户名</label>
                            <input type="text" class="form-control" value="{{ current_user.username }}" disabled>
                        </div>
                        <div class="mb-3">
                            <label class="form-label">邮箱</label>
                            <input type="email" class="form-control" value="{{ current_user.email }}" disabled>
                        </div>
                        <div class="mb-3">
                            <label for="password" class="form-label">新密码（留空表示不修改）</label>
                            <input type="password" class="form-control" id="password" name="password">
                        </div>
                        <div class="mb-3">
                            <label for="real_name" class="form-label">真实姓名</label>
                            <input type="text" class="form-control" id="real_name" name="real_name" value="{{ current_user.real_name or '' }}">
                        </div>
                        <div class="mb-3">
                            <label for="phone" class="form-label">电话</label>
                            <input type="text" class="form-control" id="phone" name="phone" value="{{ current_user.phone or '' }}">
                        </div>
                        <div class="d-grid">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 